<template>
	<view class="top">
		<view class="tupian">
			<image src="/static/下载.png" mode="heightFix" class='logo1'></image>
			<image src="/static/zhenshicheyuan.bb99b2a6.jpg" mode="heightFix" class='logo2'></image>
		</view>

		<view class="table">
			<view class="uni-padding-wrap uni-common-mt">
				<uni-segmented-control :current="current" :values="items" style-type="text" active-color="#007aff"
					@clickItem="onClickItem" />
			</view>
			<view class="content">
				<view v-show="current === 0">
					<shouye></shouye>
				</view>
				<view v-show="current === 1">
					<userWarView></userWarView>
				</view>
				<view v-show="current === 2">
					<userCarView></userCarView>
				</view>
				<view v-show="current === 3">
					选项卡4的内容
				</view>
				<view v-show="current === 4">
					选项卡5的内容
				</view>
			</view>
		</view>
	</view>
</template>

<script setup>
	import shouye from "../../components/home/home.vue";
	import userWarView from "../../components/userCarView/userCarView.vue"
	import userCarView from "../../components/linkCarView/linkCarView.vue"
	
	import { ref , reactive } from "vue"
		
		
			const items = reactive(['首页', '二手车', '新车', '卖车', '腾发服务'])	
			const current = ref(0)
		
		
		   function	onClickItem(e) {
				if (current.value !== e.currentIndex) {
					current.value = e.currentIndex
				}
			}
</script>

<style lang="scss">
	.tupian {
		width: 70rpx;
		height: 50rpx;
		padding: 20rpx;
		box-shadow: 7rpx 0px 10rpx 0px rgba(74, 101, 172, .18);
		float: left;
	}

	.logo1 {
		width: 60rpx;
		height: 30rpx;
	}

	.logo2 {
		width: 60rpx;
		height: 15rpx;
		margin: -25rpx -75rpx;
	}

	.table {
		height: 80rpx;
	}

	.content {
		margin-top: 50rpx;
	}
</style>